1. Technical Field
This invention relates generally to the field of programmable logic controllers, and more particularly, to programmable logic controller software with embedded class logic and alarm/shutdown functionality.
2. Background Art
Programmable logic controllers (PLCs) are used in a wide spectrum of applications from factory automation to waste water treatment plant controls and from chemical process plant control to engine management systems. Each application has a unique program, written to the user's specifications, to control the sequence of events for that particular system.
PLCs operate by gathering information from various sensor inputs (analog and discrete) and processing the data using Relay Ladder Logic, a type of computer program based on Hard Wired Relay Logic. As sensor data is gathered and manipulated by the user program, the PLC sends appropriate output signals to control the operation of the equipment to which it is connected. The result is safer, more efficient operation of the monitored or controlled equipment.
PLCs use discrete inputs and analog inputs (sensors) to supply data to the control application. A discrete input has two states: ON or OFF. Depending on how the input sensor is configured, ON can be the healthy state or OFF may be considered the healthy state.
An analog input is a varying input that monitors, for example, pressure, temperature or flow. Temperatures are usually measured using thermocouples or resistance temperature detectors (RTDs). Analog measurements are usually made using current loops (4-20 mA) or voltage inputs (1-5V).
In control applications, analog inputs will have setpoints which are explicitly defined operational limits for each sensor. When the measured value exceeds (or drops below) the setpoint values, the PLC is programmed to take some action. When these setpoints are critical to the operation of the system, the action is deemed to be an alarm or a shutdown. Under these circumstances the PLC may need to halt operation of the monitored process in a manner controlled by the user program. Both alarms and shutdowns send a message to an operator to indicate that a fault has occurred (such as a light or a text message on a display) in addition to taking the appropriate user programmed action. This process of displaying the existence of an alarm or shutdown is referred to as "annunciation."
Industry-standard class logic is used to determine when an input value is critical to the operation of the equipment and, hence, should be monitored. For example, in an engine application, a low oil level is always considered a fault, while a low oil pressure is not a fault at engine startup, but becomes a fault if it remains low after a specified time has expired. Each class type (A, B, b, C) specifies a different algorithm which determines when an input should be monitored for a fault condition, and every input which can generate an alarm or shutdown is assigned one of these classes. Inputs which should be monitored in some fashion but which are not allowed to generate an alarm or shutdown are assigned no class.
There are a large number of PLCs on the market today which allow the ladder logic program to be written on an external computer and then downloaded to the PLC via a communications port. A complete ladder logic program is referred to as a control application and can consist of hundreds or thousands of lines of code because each detail of the program action must be explicitly manipulated by the programmer in the program code.
As currently implemented, however, ladder logic software requires the programmer to individually include each analog setpoint and each individual discrete input into the ladder logic diagram. If class logic is required, the programmer must write this functionality specifically into the program. Sensor failure logic must also be programmed into the user program, as well as a method of checking sensor operation while the equipment is running (test mode). In addition to requiring a large amount of code to be written to execute the user program, any change in the parameters governing the PLC inputs involves manually updating the user program itself.
If a process were developed that can pre-define these operational parameters and embed their functions, as well as class logic, alarm/shutdown logic, sensor failure and other programming details into the programmable controller without the need for large amounts of user programming, the result will be greatly reduced programming time, reduction of errors and enhanced performance of the PLC.
Accordingly, what is needed is PLC software that applies industry-standard class logic to inputs in a simple and largely transparent way, with no additional requirement for user programming. What is also needed is software that can automatically handle the display and user acknowledgment of alarms and shutdowns. In addition, what is needed is software that automatically adds alarm and shutdown information to the appropriate fault log. Moreover, what is needed is software that extends the use of class logic, normally only applied to physical inputs, to user-programmable states as well. What is also needed is software that integrates sensor failure detection into the class logic alarm/shutdown functionality. Additionally, what is needed is software that allows a class event to produce additional actions beyond the default behavior by providing common alarm and common shutdown status, as well as the status of individual inputs, to the user program. Moreover, what is needed is software that allows the user program to control the enabling and timing of the internal class logic functions. In addition, what is needed is software that allows selected channel sensors to be tested by responding to user-initiated fault entries in the same manner as any other fault without activating the corresponding common alarm or common shutdown contact, thereby preventing the user program from responding to the tested-channel faults as it would to an actual fault. Finally, what is needed is software that allows user display messages to be embedded into special display coils in the ladder logic program, which messages are then displayed when the coil is activated, with no additional programming or message mapping in the PLC or display.